<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<input type="button" value="按钮" id="btn" />
		<script type="text/javascript">
			var arr = ['a', 'b', 'c'];
			var aBtn = document.getElementById('btn')
			var i=0;
			aBtn.onclick = function(){
				alert(arr[i])
				if(i<2){
					i=i+1;
				}else{
					i=0;
				}
			}
		</script>
	</body>

</html>